1. Field of the Invention
The present invention relates to an information processing apparatus, a program initializing method, and a program providing medium, all of which are suitable for use in object-oriented operating systems.
2. Description of the Related Art
An operating system (hereinafter referred to as an xe2x80x9cOSxe2x80x9d) using object-oriented techniques is referred to as an object-oriented OS. Elements of an object-oriented OS are formed into modules as objects, thereby advantageously increasing the flexibility of a system.
In some object-oriented OSs, objects forming basic elements of the OS possess an execution mechanism similar to a mechanism for objects forming an application program running on the OS. The above type of OS is referred to as a xe2x80x9cpure object-oriented OSxe2x80x9d. In the pure object-oriented OS, services provided by the OS are defined by a set of objects, thereby making it possible to more flexibly construct the OS. More specifically, for example, before starting the OS, objects providing services may be combined according to functions required by a user, and it is possible to dynamically add or delete functions to or from the OS with the purpose of optimizing or updating the OS (without the need for stopping the system).
In the pure object-oriented OS, a plurality of execution environments may be prepared for the objects, and a frame for selecting an execution environment in response to a request of an application program can be easily provided. By selecting a suitable execution environment, the application programs are able to receive services which are optimal for execution models unique to the programs. In the following description, the execution environments are defined as a set of services provided by an OS and support the operations of application programs. The execution environments may include concurrent object execution environments, Java program execution environments, portable operating system interface (POSIX) execution environments, etc.
In contrast, according to a conventional OS, which is a non-object-oriented OS, as shown in FIG. 13, only a single execution environment 202 is provided for all the application programs, such as a first application program 200 and a second application program 201. In another conventional OS, as shown in FIG. 14, a basic execution environment 210, and a plurality of execution environments, such as a first execution environment 211 and a second execution environment 212, operating on the basic execution environment 210, are prepared in advance, and a first application program 213 and a second application program 214 are operated under the corresponding execution environments. Whether the OS is provided with a single execution environment or a plurality of execution environments, as shown in FIGS. 13 and 14, respectively, the types of execution environments to be provided are fixed when the OS is started.
Accordingly, in the known OSs, in adding a new execution environment, it is necessary to interrupt the operation of the OS, select the required execution environment, and then restart the OS. Additionally, when the same services are shared by a plurality of execution environments, it is necessary to integrate the services into a basic execution environment. That is, according to conventional OSs, a plurality of execution environments cannot be flexibly provided.
Typically, in conventional OSs, initialization is performed by a series of steps, such as those shown in FIG. 15. An example of an initializing process in a conventional OS is discussed below with reference to FIG. 15.
In step S220, hardware is initialized, for example, registers are set and input/output devices are initialized. Then, in step S221, portions shared by the individual software modules, such as name management service, memory management service, and so on are initialized.
It is then determined in step S222 whether all the execution environments have been initialized. If the outcome of step S222 is no, the process proceeds to step S223 in which the corresponding execution environment is initialized. The process then returns to step S222.
If the result of step S222 is yes, the process proceeds to step S224. It is determined in step S224 whether all the software modules to be operated have been initialized. If the outcome of step S224 is no, the process proceeds to step S225. If the result of step S224 is yes, the process proceeds to step S228.
In step S225, a memory required for a software module which is not yet initialized is assigned. Subsequently, in step S226, a structure required for this software module is generated. Then, in step S227, an initializing function is called for this software module, and the process returns to step S224.
In step S228, a software module which is to be operated first is called, and the initializing process is completed.
In some conventional OSs, each software module may initialize itself rather than depending on the above-described initializing process.
On the other hand, a pure object-oriented OS is formed of, as illustrated in FIG. 16, a set of a plurality of objects, and provides execution environments by flexibly utilizing these objects. Thus, according to the pure object-oriented OS, by adding or deleting an object, an execution environment can be easily added, deleted, or updated. Additionally, in the pure object-oriented OS, an object can be easily shared by a plurality of execution environments.
In FIG. 16, a first execution environment 230 is used as a concurrent object-oriented execution environment, which runs a first application program 231, and a second execution environment 232 is used as a non-object-oriented execution environment, which runs a second application program 233. In this pure object-oriented OS, objects, such as a downloader 234, a scheduler 235, and a registry 236, are shared by the first execution environment 230 and the second execution environment 232. In addition to those objects shared with the second execution environment 232, the first execution environment 230 includes a first message handler 237, a first memory manager 238, and an object manager 239. In addition to the objects shared with the first execution environment 230, the second execution environment 232 includes a second message handler 240, a second memory manager 241, and a thread manager 242.
According to the pure object-oriented OS, only the first execution environment 230 may be provided when the OS is started. Then, if the necessity arises for operating the second application program 233, the second execution environment 232 can be provided by adding the second message handler 240, the second memory manager 241, and the thread manager 242. In this manner, according to the pure object-oriented OS, a plurality of execution environments can be flexibly provided as needed.
In the pure object-oriented OS as described above, if a system is initialized according to an initializing process similar to the aforementioned process, the following three problems are raised, thereby failing to sufficiently exhibit the characteristics of the pure object-oriented OS.
According to the above-described initializing process, an adequate consideration is not given to the presence of a plurality of execution environments. In conventional OSs, each software module possesses information of an execution environment to which the software module belongs. Additionally, a software module forming an execution environment installs another software module which is to be executed under the execution environment according to a unique technique, and in some cases, a software module initializes itself. Thus, according to the above-described OS initializing process, an execution environment to which each software module belongs cannot be identified in advance. Consequently, processing executed in common for a plurality of execution environments, such as searching for a software module or checking for the presence of an execution environment on a system into which a software module is to be installed cannot be performed, thereby making it difficult to efficiently utilize a memory space.
Moreover, the above-described initializing processing for software modules is not sufficiently distributed. In conventional OSs, the processing required for initializing the individual software modules is wholly performed by a program for initializing the OS. That is, processing, such as assigning memory and generating a structure, is executed in the initializing program, as shown in FIG. 15. It is thus difficult to flexibly perform initialization for each software module.
Additionally, both types of processes, such as a process used only when the OS is initialized, for example, a process for the initialization of hardware, and a process continued to be used even after the OS has been initialized, for example, a process for the initialization of application programs, are present in the same initializing program. Thus, the initializing program cannot be deleted even after the initializing processing is completed. Accordingly, the process used only when the OS is initialized is still present in a memory space even after the OS has been started, thereby hampering the efficient use of the memory space.
As stated above, according to the conventional OS initializing process, the memory space cannot be efficiently utilized, and initialization for software modules cannot be flexibly performed when the system is initialized. Thus, even if a process similar to the aforementioned initializing process is applied to a pure object-oriented OS, the characteristics of the pure object-oriented OS cannot be adequately exhibited.
Accordingly, it is an object of the present invention to provide an information processing apparatus, a program initializing method, and a program providing medium, all of which are suitable for the characteristics of a pure object-oriented OS, by the efficient use of a memory space and by the execution of flexible initializing processing.
In order to achieve the above object, according to one aspect of the present invention, there is provided an information processing apparatus including an OS which has at least one program execution environment and which makes a plurality of objects executable in each of the program execution environments. The information processing apparatus includes a core execution environment and an initial execution environment. The core execution environment provides a function of initializing the plurality of objects on the OS. The initial execution environment executes an OS initializing object by providing a basic processing function of an object-oriented system on the OS. The initial execution environment is deleted after execution processing is migrated to the core execution environment. The OS initializing object creates and initializes the core execution environment based on a boot information structure and is migrated to the core execution environment before the initial execution environment is deleted.
With this arrangement, the initial execution environment for executing the OS initializing object is deleted after the OS has been initialized and after the execution processing has been migrated to the core execution environment. Thus, the OS can be initialized by effectively utilizing the memory space. The OS initializing object creates and initializes the core execution environment based on the boot information structure, thereby making it possible to flexibly initialize the OS.
According to another aspect of the present invention, there is provided a program initializing method for an OS which includes at least one program execution environment and which makes a plurality of objects executable in each of the program execution environments. The program initializing method includes an initial execution environment creating step, a core execution environment initializing step, an object migrating step, and an initial execution environment deleting step. In the initial execution environment creating step, an initial execution environment for providing a basic processing function of an object-oriented system is created on the OS. In the core execution environment initializing step, an OS initializing object is executed in the initial execution environment and, a core execution environment is created based on a boot information structure. Objects forming the core execution environment are created and initialized in the initial execution environment. In the object migrating step, the OS initializing object and the objects forming the core execution environment are migrated to the core execution environment. In the initial execution environment deleting step, the initial execution environment is deleted.
With this arrangement, the initial execution environment for executing the OS initializing object is deleted after the OS initializing object and the objects providing the core execution environment have been migrated to the core execution environment. Thus, the OS can be initialized by effectively utilizing the memory space. The OS initializing object creates and initializes the core execution environment based on the boot information structure, thereby making it possible to flexibly initialize the OS.
According to a further aspect of the present invention, there is provided a program providing medium for providing a data processing program of an OS. The OS includes at least one program execution environment and makes a plurality of objects executable in each of the program execution environments. The data processing program includes an initial execution environment creating step, a core execution environment initializing step, an object migrating step, and an initial execution environment deleting step. In the initial execution environment creating step, an initial execution environment for providing a basic processing function of an object-oriented system is created on the OS. In the core execution environment initializing step, an OS initializing object is executed in the initial execution environment and, a core execution environment is created based on a boot information structure. Objects forming the core execution environment are created and initialized in the initial execution environment. In the object migrating step, the OS initializing object and the objects forming the core execution environment are migrated to the core execution environment. In the initial execution environment deleting step, the initial execution environment is deleted.